package com.sinopec.basemodule.constants;

import android.os.Build;

/**
 * @author lwj
 * @ClassName: DeviceEnum
 * @Description: 获取设备信息
 */
public enum DeviceEnum {

    /**
     * 1, "手机或平板设备"
     */
    PHONE(1, "手机或平板设备"),

    /**
     * 2, "成为主机模式"
     */
    CHENGWEI(2, "成为主机模式");


    private int id;
    private String value;

    DeviceEnum(int id, String value) {
        this.id = id;
        this.value = value;
    }

    public static DeviceEnum deviceType() {
        switch (Build.MODEL) {
            case "A4_8953":
                return CHENGWEI;
            //你可以有任意数量的case语句
            default:
                return PHONE;
        }
    }

    //是否是读写设备
    public static boolean isHandDevice() {
        return DeviceEnum.CHENGWEI == DeviceEnum.deviceType();
    }
}